﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AutoFlatnessTest.Db
{
    public class TestRecordDayDattaDto
    {
        public int Day { get; set; }
        public int Count { get; set; }
        public int OkCount { get; set; }
        public int NoOkCount { get; set; }
    }

    public class TestRecordPageDto : PageDb
    {
        public DateTime? TimeGo { get; set; }
        public DateTime? TimeTo { get; set; }
        public string Project { get; set; }
        public string Work { get; set; }
        public string Ma { get; set; }
    }

    public class GetPageDto : TestRecord
    {
        public string ModeStr
        {
            get
            {
                var isok = Enum.TryParse(Mode.ToString(), out MoShi re);
                return isok ? re.ToString() : "";
            }
        }
        public string SyncStr { get => IsSync == 1 ? "否" : "是"; }
        public string ChaStr { get => $"{MiVal}({MiMaxVal},{MiMinVal})"; }
        public string NumStr { get => $"{TestNum}({RowNum},{ColumnNum})"; }
        public string IsOkStr { get => IsOk == 1 ? "合格" : "不合格"; }
        public string TimeStr { get => CreatedTime?.ToString("yyyy-MM-dd HH:mm:ss"); }
    }
}
